package boardgamer.common.client.board.testing;

import boardgamer.common.board.TiledBoard;
import com.google.common.collect.HashBasedTable;
import com.google.common.collect.Table;

import java.util.Collection;

/**
* @author garysoed
*/
public class MockBoard extends TiledBoard<MockTile> {

  public Table<Integer, Integer, MockTile> board = HashBasedTable.create();

  @Override
  public Collection<MockTile> getTiles() {
    return board.values();
  }

  @Override
  public boolean hasTile(int x, int y) {
    return board.get(x, y) != null;
  }

  @Override
  public Table<Integer, Integer, MockTile> getBoard() {
    return board;
  }

  @Override
  protected MockTile findTile(int x, int y) {
    return board.get(x, y);
  }
}
